-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replace vsock helper server with socat and related changes #4125
Conversation
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main #4125 +/- ##
=======================================
Coverage 82.27% 82.27%
=======================================
Files 225 225
Lines 28470 28470
=======================================
Hits 23423 23423
Misses 5047 5047
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, some minor comments you could add if you do another revision.
This is to avoid code duplication. Signed-off-by: Nikita Kalyazin <[email protected]>
This is to reduce likelihood of bugs by reducing the amount of hand-written test code, in this case vsock echo server on the guest. See a similar change: commit bfa0dc7 Author: Pablo Barbáchano <[email protected]> Date: Wed Jun 7 22:04:38 2023 +0200 test: change the echo server in test_5_snapshots Signed-off-by: Nikita Kalyazin <[email protected]>
This is to avoid a situation where clients do not get reply after they send a connect message, like this: framework/utils_vsock.py:197: in _vsock_connect_to_guest ack_buf = sock.recv(32) E Failed: Timeout >300.0s Signed-off-by: Nikita Kalyazin <[email protected]>
In negative vsock tests, a guest echo server was started both independently and inside check_host_connections() leading to multiple instances running in the guest at the same time. This commit removes starting the server inside check_host_connections(). This makes it inconsistent with check_guest_connections() that still starts a host echo server internally, but removing it is not currenlty warrranted. Signed-off-by: Nikita Kalyazin <[email protected]>
Move the check that metrics contain an expected sigpipe count closer to the code that triggers the sigpipe signal. This will make it easier to diagnose potential issues related to check_host_connections() logic in the future. Signed-off-by: Nikita Kalyazin <[email protected]>
A large blob size (20M) is used in the first part of the test to increase likelihood of triggering the epipe condition. In the second part of the test, a call to check_host_connections() is performed to verify that Firecracker can still operate after receiving a sigpipe. There is no need to use a large blob size in the second part. This commit gets back to the default blob size in the second part of the test to reduce the test duration. Signed-off-by: Nikita Kalyazin <[email protected]>
Calculation of the path is usually done by the calling code anyway. Signed-off-by: Nikita Kalyazin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ngl, I'm fairly baffled by that ah, I see now, we're not testing that firecracker gets a SIGPIPE, we're testing that the SIGPIPE doesnt cause firecracker to exit: #2462SIGPIPE
test, but the changes make sense to me
Changes
These changes are supposed to improve vsock tests' stability by:
socat
instead of hand-written vsock echo server in the guestReason
vsock-related tests are not stable.
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following
Developer Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md
.PR Checklist
[ ] If a specific issue led to this PR, this PR closes the issue.[ ] Any required documentation changes (code and docs) are included in this PR.[ ] API changes follow the Runbook for Firecracker API changes.[ ] User-facing changes are mentioned inCHANGELOG.md
.[ ] All added/changed functionality is tested.[ ] NewTODO
s link to an issue.rust-vmm
.